home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 4
/
Aminet 4 - November 1994.iso
/
aminet
/
comm
/
uucp
/
wcnews_1_0_30.lha
/
man
/
expire.man
< prev
next >
Wrap
Text File
|
1994-01-04
|
14KB
|
331 lines
EXPIRE(8) EXPIRE(8)
1mNAME22m
expire, doexpire - expire old news
mkhistory - rebuild news history file
upact - update news active file
recovact - partially recover news active file
1mSYNOPSIS22m
1m/usr/lib/newsbin/expire/expire22m [ 1m-a22m archdir ] [ 1m-p22m ] [ 1m-s22m
] [ 1m-F22m c ] [ 1m-c22m ] [ 1m-n22m nnnnn ] [ 1m-t22m ] [ 1m-l22m ] [ 1m-v22m ] [ 1m-d22m ]
[ 1m-r22m ] [ 1m-g22m ] [ 1m-h22m ] [ controlfile ]
1m/usr/lib/newsbin/expire/doexpire22m expireoptions
1m/usr/lib/newsbin/expire/mkhistory22m
1m/usr/lib/newsbin/expire/upact22m
1m/usr/lib/newsbin/expire/recovact22m
1mDESCRIPTION22m
4mExpire24m expires old news, removing it from the currentnews
directories and (if asked to) archiving it elsewhere. It
updates news's 4mhistory24m file to match. 4mExpire24m should nor
mally be run nightly, typically by using 4mdoexpire24m (see
below).
4mExpire24m's operations are controlled by a control file
(which can be named or supplied on standard input), which
is not optionalthere is no default behavior. Each line
of the control file (except for empty lines and lines
starting with `#', which are ignored) should have four
whitespaceseparated fields, as follows.
The first field is one or more newsgroups, separated by
commas (no spaces!); partial specifications are acceptable
(e.g. `comp' specifies all groups with that prefix).
The second field is one letter, `m', `u', or `x', specify
ing that the line applies only to moderated groups, only
to unmoderated groups, or to both, respectively.
The third field specifies the expiry period in days. The
most general form is three numbers separated by dashes.
The units are days; decimal fractions are permitted. The
first number gives the retention period: how long must
pass after an article's arrival before it is a candidate
for expiry. The third number gives the purge date: how
long must pass after arrival before the article will be
expired unconditionally. The middle number gives the
default expiry date: how long after an article's arrival
it is expired by default. An explicit expiry date in the
article will override the default expiry date but not the
retention period or the purge date. If the field contains
only two numbers with a dash separating them, the reten
tion period defaults to 0. If the field contains only a
number, the retention period defaults to 0 and the purge
date defaults to `never'. (But see below.)
28 Oct 1990 1
EXPIRE(8) EXPIRE(8)
The fourth field is an archiving directory, or `@' which
indicates that the default archiving directory (see 1m-a22m)
should be used, or `-' which suppresses archiving. An
explicit archiving directory (not `@') prefixed with `='
means that articles should be archived into that directory
itself; normally they go into subdirectories under it by
newsgroup name, as in the currentnews directory tree.
(E.g., article 123 of comp.pc.drivel being archived into
archive directory 4m/exp24m would normally become
4m/exp/comp/pc/drivel/12324m, but if the archiving directory
was given as `=/exp' rather than `/exp', it would become
4m/exp/12324m.) 4mExpire24m creates subdirectories under an archiv
ing directory automatically, but will not create the
archiving directory itself. Archiving directories must be
given as full pathnames.
The first line of the control file which applies to a
given article is used to control its expiry. It is an
error for no line to apply; the last line should be some
thing like `all x 7 -' to ensure that at least one line is
always applicable. Crossposted articles are treated as
if they were independently posted to each group.
The retention and purge defaults can be overridden by
including a 4mbounds24m line, one with the special first field
1m/bounds/22m; the retention and purge defaults for following
lines will be those of the bounds line. The other fields
of a bounds line are ignored but must be present.
Entries in the 4mhistory24m file can be retained after article
expiry, to stop a latearriving copy of the article from
being taken as a new article. To arrange this, include a
line with the special first field 1m/expired/22m; this line
then controls the expiry of 4mhistory24m lines after the corre
sponding articles expire. Dates are still measured from
article arrival, not expiry. The other fields of such a
line are ignored but must be present. It is strongly rec
ommended that such a line be included, and that it specify
as long a time as practical.
Commandline options are:
1m-a22m dir 4mdir24m is the default archiving directory; if no
default is given, the control file may not con
tain any `@' archivedirectory fields.
1m-p22m print an `index' line for each archived article,
containing its pathname, message ID, date
received, and `Subject:' line.
1m-s22m space is tight; optimize error recovery to mini
mize space consumed rather than to leave as much
evidence as possible.
28 Oct 1990 2
EXPIRE(8) EXPIRE(8)
1m-F22m c the subfield separator character in the middle
4mhistory24m field is 4mc24m rather than the normal `~'.
1m-c22m check the format and consistency of the control
file and the 4mactive24m file, but do not do any
expiring.
1m-n22m nnnnn set 4mexpire24m's idea of the time to 4mnnnnn24m (for
testing).
1m-t22m print (on standard error) a shellscriptlike
description of what would be done, but don't do
it. In the absence of archiving, all output
lines will be of the form ``1mremove22m 4mname24m'', where
4mname24m is a pathname relative to 4m/usr/spool/news24m.
If an article is to be archived, this will be
preceded (on the same line) by
``1mcopy22m 4mname24m 4mdir24m 1m;22m '', where 4mname24m is as in 1mremove22m
and 4mdir24m is an archiving directory (including any
`=' prefix) as specified by the control file or
the 1m-a22m option.
1m-l22m consider first filename in a 4mhistory24m line to be
the 4mleader24m of its line, to be expired only after
all others have expired. (Meant for use on
obnoxious systems like VMS which don't support
real links.)
1m-r22m suppress 4mhistory24m rebuild. Mostly for emergen
cies. (This leaves the 4mhistory24m file out of date
and larger than necessary, but improves speed
and eliminates the need for several megabytes of
temporary storage.)
1m-h22m do not expire any article which would be
archived if it were expired. Mostly for emer
gencies, so that 4mexpire24m can be run (to delete
articles in nonarchived groups) even if space
is short in archiving areas.
1m-v22m verbose: report some statistics after termina
tion.
1m-g22m report expiry dates that 4mgetdate24m(3) does not
like. 4mExpire24m ignores such dates, treating the
article as if it had no explicit expiry date.
1m-d22m turn on (voluminous and cryptic) debugging out
put.
4mExpire24m considers the middle field of a 4mhistory24m line to
consist of one or more subfields separated by `~'. The
first is the arrival date, which can be either a 4mget24m
4mdate24m(3)readable date or a decimal seconds count; 4mexpire24m
28 Oct 1990 3
EXPIRE(8) EXPIRE(8)
leaves this field unchanged. The secondif present, non
null, and not `-'is an explicit expiry date for the
file, again in either format, which 4mexpire24m will convert to
a decimal seconds count as it regenerates the 4mhistory24m
file. Subsequent fields are preserved but ignored.
4mDoexpire24m checks whether another 4mdoexpire24m is running,
checks that there is enough disk space, invokes 4mexpire24m
with any 4mexpireoptions24m given and with
4m/usr/lib/news/explist24m as the control file, and reports any
difficulties by sending mail to 4musenet24m. This is usually
better than just running 4mexpire24m directly. If space is not
adequate for archiving, 4mdoexpire24m reports this and invokes
4mexpire24m with the 1m-h22m option. If 1m-r22m is not among the 4mexpire24m
4moptions24m, and disk space is persistently inadequate for the
temporaries needed for history rebuilding, 4mdoexpire24m
reports this and invokes 4mexpire24m with the 1m-r22m option anyway.
4mMkhistory24m rebuilds the 4mhistory24m file and its auxiliaries to
match the articles in 4m/usr/spool/news24m. 4mUpact24m updates the
third fields of the 4mactive24m file to match the articles in
4m/usr/spool/news24m (for historical reasons, 4mexpire24m does not
do this). 4mRecovact24m updates the second fields of the
4mactive24m file to match the articles in 4m/usr/spool/news24m, for
use in disaster recovery based on an outdated 4mactive24m file.
These programs are all fairly slow and they all lock the
whole news system for the duration of the run, so they
should not be run casually.
1mFILES22m
/usr/lib/news/history history file
/usr/lib/news/history.pag4mdbm24m database for history file
/usr/lib/news/history.dir4mdbm24m database for history file
/usr/lib/news/explist expiry control file
/usr/lib/news/history.o history file as of last expiry
/usr/lib/news/history.n*new history file and 4mdbm24m files abuilding
/usr/lib/news/LOCKexpire4mdoexpire24m's lock file
/usr/lib/newsbin/expire/*various auxiliaries
1mSEE22m 1mALSO22m
inews(1), dbm(3), relaynews(8)
1mHISTORY22m
Written at U of Toronto by Henry Spencer, with contribu
tions by Geoff Collyer.
1mBUGS22m
Archiving is always done by copying, never by linking.
This has the side effect that crossposted articles are
archived as several independent copies.
The 1m-p22m subjectfinder botches continued header lines, as
does 4mmkhistory24m, although such lines are rare.
28 Oct 1990 4
EXPIRE(8) EXPIRE(8)
4mUpact24m is a distasteful kludge, but then, so is the third
field of the 4mactive24m file.
4mUpact24m forces the third field of the 4mactive24m file to be at
least five digits, for backward compatibility, but other
wise just makes it as large as necessary. The group
creation operations always create it ten digits long. The
discrepancy is harmless, since unlike the second field,
the third field is never updated in place.
One cannot put more than one newsgroup into a single
archiving directory with the `=' feature, since the arti
cle numbers will collide with each other and expire
doesn't do anything about this. Note that archiving a
newsgroup which has subgroups into an `=' directory puts
all the subgroups in the same directory as the parent!
(Specifying the group as `foo.bar,!foo.bar.all' will avoid
this.)
4mMkhistory24m is inherently incapable of reconstructing his
toryfile lines corresponding to expired articles. Pro
tection against old articles reappearing is thus somewhat
limited for a while after the history file is rebuilt.
4mExpire24m uses 4maccess24m(2) to test for the presence of archiv
ing directories, which can cause anomalies if it is run
setuid (normally it's not).
28 Oct 1990 5